package com.sudoku.SudokuV01;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;

/**
 * Created by richard on 02/02/14.
 */
public class grilleDetail extends Activity {
    Dessin myDessin;
    private static Handler handler;

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.grille);
        myDessin = (Dessin) findViewById (R.id.dessin);
        //Log.e("TEST3", myDessin+"");
        handler = new Handler() {
            @Override
            public void handleMessage(Message msg) {
                myDessin.invalidate();
            }

        };
        myDessin.handler = handler;
        if(!myDessin.isRunning) myDessin.running();


    }
    public void onPause() {
        super.onPause();
        myDessin.stopRunning();
    }

    public void onResume() {
        super.onResume();  // Always call the superclass method first
       if(!myDessin.isRunning) myDessin.running();
    }
}